home *** CD-ROM | disk | FTP | other *** search
/ University of Minnesota Welcome Kit 2002 / PC Internet Tool.iso / pc / Extras / DS / LABPOP / LABPOP.JSS < prev   
Encoding:
Text File  |  1999-07-09  |  8.7 KB  |  456 lines

  1. include "hjglobal.jsh"
  2. Include "hjconst.jsh" ; default HJ constants
  3.  
  4. Globals
  5.     int LPMFirstTime
  6.  
  7. Function FocusChangedEvent ()
  8. Var
  9.     int safety,
  10.     int verbosity
  11. Let safety = 0
  12. Let verbosity = GetVerbosity ()
  13. If GetControlID (GetFocus ()) == 1020 && verbosity !=2 then
  14.     While verbosity != 2 && safety < 2
  15.         VerbosityLevel ()
  16.         Let safety = safety + 1
  17.     Endwhile
  18. Elif GetControlID (GetFocus ()) != 1020 && verbosity !=0 then
  19.     While verbosity != 0 && safety < 2
  20.         VerbosityLevel ()
  21.         Let safety = safety + 1
  22.     Endwhile
  23. Endif
  24. If GetControlID (GetFocus ()) == 1034 then
  25. {alt+SpaceBar}
  26. {x}
  27.     SayAll ()
  28.     Return
  29. Endif
  30. If GetControlID (GetFocus ()) == 1042 then
  31. {alt+SpaceBar}
  32. {x}
  33. Endif
  34. If GetControlID (GetFocus ()) == 1020 then
  35.     While verbosity != 2 && safety < 2
  36.         VerbosityLevel ()
  37.         Let safety = safety + 1
  38.     Endwhile
  39. ;SayWindowTypeAndText (GetParent (GetFocus ()))
  40. Endif
  41. If DialogActive () && GetControlID (GetFocus ()) == 6 then
  42. SayString (GetDialogStaticText ())
  43. Elif DialogActive () && GetControlID (GetFocus ()) == 2 then
  44. SayString (GetDialogStaticText ())
  45. Endif
  46. If GetControlID (GetFocus ()) == 1123 then
  47.     SaveCursor ()
  48.     InvisibleCursor ()
  49.     SaveCursor ()
  50.     RouteInvisibleToPc ()
  51.     JAWSHome ()
  52.     NextLine ()
  53. SayLine ()
  54.     NextLine ()
  55.     SayLine ()
  56.     NextLine ()
  57.     SayLine ()
  58. Endif
  59. SayWindowTypeAndText (GetFocus ())
  60. Return
  61. EndFunction
  62.  
  63. Script ReadFromField ()
  64. If DialogActive () then
  65.     SayWindowTypeAndText (GetFocus ())
  66.     Return
  67. Elif MenusActive () then
  68.     SayChunk ()
  69.     Return
  70. Elif GetControlID (GetFocus ()) == 1034 then
  71. SaveCursor ()
  72. InvisibleCursor ()
  73. SaveCursor ()
  74. RouteInvisibleToPc ()
  75. JAWSPageUp ()
  76. JAWSHome ()
  77. NextLine ()
  78. NextLine ()
  79. NextLine ()
  80. SayLine ()
  81. RestoreCursor ()
  82. RestoreCursor ()
  83. Endif
  84. EndScript
  85.  
  86. Script ReadDateField ()
  87. If DialogActive () then
  88.     SayWindowTypeAndText (GetFocus ())
  89.     Return
  90. Elif MenusActive () then
  91.     SayChunk ()
  92.     Return
  93. Elif GetControlID (GetFocus ()) == 1034 then
  94. SaveCursor ()
  95. InvisibleCursor ()
  96. SaveCursor ()
  97. RouteInvisibleToPc ()
  98. JAWSPageUp ()
  99. JAWSHome ()
  100. NextLine ()
  101. NextLine ()
  102. NextLine ()
  103. NextLine ()
  104. SayLine ()
  105. RestoreCursor ()
  106. RestoreCursor ()
  107. Endif
  108. EndScript
  109.  
  110. Script ReadToField ()
  111. If DialogActive () then
  112.     SayWindowTypeAndText (GetFocus ())
  113.     Return
  114. Elif MenusActive () then
  115.     SayChunk ()
  116.     Return
  117. Elif GetControlID (GetFocus ()) == 1034 then
  118. SaveCursor ()
  119. InvisibleCursor ()
  120. SaveCursor ()
  121. RouteInvisibleToPc ()
  122. JAWSPageUp ()
  123. JAWSHome ()
  124. NextLine ()
  125. NextLine ()
  126. NextLine ()
  127. NextLine ()
  128. NextLine ()
  129. SayLine ()
  130. RestoreCursor ()
  131. RestoreCursor ()
  132. Endif
  133. EndScript
  134.  
  135. Script ReadCCField ()
  136. If DialogActive () then
  137.     SayWindowTypeAndText (GetFocus ())
  138.     Return
  139. Elif MenusActive () then
  140.     SayChunk ()
  141.     Return
  142. Elif GetControlID (GetFocus ()) == 1034 then
  143. SaveCursor ()
  144. InvisibleCursor ()
  145. SaveCursor ()
  146. RouteInvisibleToPc ()
  147. JAWSPageUp ()
  148. JAWSHome ()
  149. NextLine ()
  150. NextLine ()
  151. NextLine ()
  152. NextLine ()
  153. NextLine ()
  154. NextLine ()
  155. SayLine ()
  156. RestoreCursor ()
  157. RestoreCursor ()
  158. Endif
  159. EndScript
  160.  
  161. Script ReadSubjectField ()
  162. If DialogActive () then
  163.     SayWindowTypeAndText (GetFocus ())
  164.     Return
  165. Elif MenusActive () then
  166.     SayChunk ()
  167.     Return
  168. Elif GetControlID (GetFocus ()) == 1034 then
  169. SaveCursor ()
  170. InvisibleCursor ()
  171. SaveCursor ()
  172. RouteInvisibleToPc ()
  173. JAWSPageUp ()
  174. JAWSHome ()
  175. NextLine ()
  176. NextLine ()
  177. NextLine ()
  178. NextLine ()
  179. NextLine ()
  180. NextLine ()
  181. NextLine ()
  182. SayLine ()
  183. RestoreCursor ()
  184. RestoreCursor ()
  185. Endif
  186. EndScript
  187.  
  188. Script NextLine ()
  189. If GetControlID (GetFocus ()) == 1020 && GetActiveCursor () == "1" && MenusActive () == "INACTIVE" then
  190. NextLine ()
  191. SayWindowTypeAndText (GetFocus ())
  192.     Return
  193. Endif
  194. NextLine ()
  195. SayLine ()
  196. EndScript
  197.  
  198. Script PriorLine ()
  199. If GetControlID (GetFocus ()) == 1020 && GetActiveCursor () == "1" && MenusActive () == "INACTIVE" then
  200. PriorLine ()
  201. SayWindowTypeAndText (GetFocus ())
  202. Return
  203. Endif
  204. PriorLine ()
  205. SayLine ()
  206. EndScript
  207.  
  208. Script CTRLHomePress ()
  209. If GetControlID (GetFocus ()) == 1034 && GetActiveCursor () == 1 then
  210. SpeechOff ()
  211. {ctrl+home}
  212. Delay (1)
  213. SpeechOn ()
  214. SayString ("Top of file")
  215. SayWindowTypeAndText (GetFocus ())
  216. Endif
  217. Return
  218. EndScript
  219.  
  220. Script CTRLEndPress ()
  221. If GetControlID (GetFocus ()) == 1034 && GetActiveCursor () == 1 then
  222. SpeechOff ()
  223. {ctrl+end}
  224. Delay (1)
  225. SpeechOn ()
  226. SayString ("Bottom of file")
  227. SayWindowTypeAndText (GetFocus ())
  228. Endif
  229. Return
  230. EndScript
  231.  
  232. Script HomeKeyPress ()
  233. If GetControlID (GetFocus ()) == 1020 then
  234. SpeechOff ()
  235. {home}
  236. Delay (1)
  237. SpeechOn ()
  238. SayWindowTypeAndText (GetFocus ())
  239. Else
  240. SayString ("Home")
  241. {home}
  242. Endif
  243. Return
  244. EndScript
  245.  
  246. Script EndKeyPress ()
  247. If GetControlID (GetFocus ()) == 1020 then
  248. SpeechOff ()
  249. {end}
  250. Delay (1)
  251. SpeechOn ()
  252. SayWindowTypeAndText (GetFocus ())
  253. Else
  254. SayString ("End")
  255. {end}
  256. Endif
  257. Return
  258. EndScript
  259.  
  260. Script SayLine ()
  261. Var
  262.     int safety,
  263.     int verbosity
  264. Let safety = 0
  265. Let verbosity = GetVerbosity ()
  266. If GetActiveCursor () == 1 && GetControlID (GetFocus ()) == 1020 then
  267.         While verbosity != 2 && safety < 2
  268.         VerbosityLevel ()
  269.         Let safety = safety + 1
  270.     Endwhile
  271. SayWindowTypeAndText (GetFocus ())
  272. Else
  273. SayLine ()
  274. Endif
  275. Return
  276. EndScript
  277.  
  278. Script HotKeyHelp ()
  279. if (JAWSHotKeys()) then
  280.     return
  281. endif
  282. SayString ("Hotkeys for use with PopMail:" )
  283. SayString ("Press F2 or ALT+W to compose a new message")
  284. SayString ("Press F4 or ALT+G to get new mail")
  285. SayString ("Press ALT+R to reply to a message")
  286. SayString ("Press ALT+O to forward a message")
  287.     SayString ("Press ALT+N to send a message")
  288. SayString ("Press F6 or ALT+D to shread (delete) a message")
  289.     SayString ("Press ALT+U to move to the previous message")
  290.     SayString ("Press ALT+X to move to the next message")
  291.     SayString ("Press ALT+1 to read the From Field for a message")
  292.     SayString ("Press ALT+2 to read the Date Field for a message")
  293.     SayString ("Press ALT+3 to read the To Field for a message")
  294.     SayString ("Press ALT+4 to read the CC Field for a message")
  295.     SayString ("Press ALT+5 to read the Subject Field for a message")
  296.     SayString ("Press CTRL+M to maximize the messages list box")
  297. EndScript
  298.  
  299. Script PrintButtonPress ()
  300. If GetControlID (GetFocus ()) == 1034 then
  301.     {alt+f}
  302.     {p}
  303. Else
  304.     SayString ("You are not in a message")
  305. Endif
  306. EndScript
  307.  
  308. Script UpButtonPress ()
  309. Var
  310.     string wn1,
  311.     string wn2,
  312.     string ml1,
  313.     String ml2
  314. If DialogActive () then
  315.     SayWindowTypeAndText (GetFocus ())
  316.     Return
  317. Elif MenusActive () then
  318.     SayChunk ()
  319.     Return
  320. Elif GetControlID (GetFocus ()) == 1034 then
  321.     Let wn1 = GetWindowName (GetParent (GetFocus ()))
  322.     SpeechOff ()
  323.     PcCursor ()
  324.     {control+home}
  325.     Let ml1 = GetLine ()
  326.     {alt+u}
  327.     Pause ()
  328.     Let wn2 = GetWindowName (GetParent (GetFocus ()))
  329.     PcCursor ()
  330.     {control+home}
  331.     Let ml2 = GetLine ()
  332.     SpeechOn ()
  333. If ml2 != ml1 | wn1 != wn2 then
  334. ;Read subject field
  335.     SaveCursor ()
  336. InvisibleCursor ()
  337. SaveCursor ()
  338. RouteInvisibleToPc ()
  339. JAWSPageUp ()
  340. JAWSHome ()
  341. NextLine ()
  342. NextLine ()
  343. NextLine ()
  344. NextLine ()
  345. NextLine ()
  346. NextLine ()
  347. NextLine ()
  348. SayLine ()
  349. RestoreCursor ()
  350. RestoreCursor ()
  351. ;Read from field
  352.     SaveCursor ()
  353. InvisibleCursor ()
  354. SaveCursor ()
  355. RouteInvisibleToPc ()
  356. JAWSPageUp ()
  357. JAWSHome ()
  358. NextLine ()
  359. NextLine ()
  360. NextLine ()
  361. SayLine ()
  362. RestoreCursor ()
  363. RestoreCursor ()
  364.     SayAll ()
  365. Else
  366. SayString ("No More Messages")
  367. Endif
  368. Endif
  369. EndScript
  370.  
  371. Script NextButtonPress ()
  372. Var
  373.     string wn1,
  374.     string wn2,
  375.     string ml1,
  376.     string ml2
  377. If DialogActive () then
  378.     SayWindowTypeAndText (GetFocus ())
  379.     Return
  380. Elif MenusActive () then
  381.     SayChunk ()
  382.     Return
  383. Elif GetControlID (GetFocus ()) == 1034 then
  384.     Let wn1 = GetWindowName (GetParent (GetFocus ()))
  385.     SpeechOff ()
  386.     PcCursor ()
  387.     {control+home}
  388.     Let ml1 = GetLine ()
  389.     {alt+x}
  390.     Pause ()
  391.     Let wn2 = GetWindowName (GetParent (GetFocus ()))
  392.     PcCursor ()
  393.     {control+home}
  394.     Let ml2 = GetLine ()
  395.     SpeechOn ()
  396. If ml1 != ml2 | wn1 != wn2 then
  397. ;Read subject field
  398.     SaveCursor ()
  399. InvisibleCursor ()
  400. SaveCursor ()
  401. RouteInvisibleToPc ()
  402. JAWSPageUp ()
  403. JAWSHome ()
  404. NextLine ()
  405. NextLine ()
  406. NextLine ()
  407. NextLine ()
  408. NextLine ()
  409. NextLine ()
  410. NextLine ()
  411. SayLine ()
  412. RestoreCursor ()
  413. RestoreCursor ()
  414. ;Read from field
  415.     SaveCursor ()
  416. InvisibleCursor ()
  417. SaveCursor ()
  418. RouteInvisibleToPc ()
  419. JAWSPageUp ()
  420. JAWSHome ()
  421. NextLine ()
  422. NextLine ()
  423. NextLine ()
  424. SayLine ()
  425. RestoreCursor ()
  426. RestoreCursor ()
  427. SayAll ()
  428. Else
  429.     SayString ("No More Messages")
  430. Endif
  431. Endif
  432. EndScript
  433.  
  434. Script ScriptAndAppNames ()
  435. ScriptAndAppNames ("WS_POPmail (lab version)")
  436. EndScript
  437.  
  438. Function AutoStartEvent ()
  439. If LPMFirstTime == 0 then
  440.     Let LPMFirstTime = 1
  441. SayString (GetAppTitle ())
  442.     SayString ("Press Insert+H for help with Lab POPmail hotkeys")
  443. Endif
  444. Return
  445. EndFunction
  446.  
  447. Function AutoFinishEvent ()
  448. Let LPMFirstTime = 0
  449. EndFunction
  450.  
  451. Script MaximizeMessageWindow ()
  452. ActivateMenuBar ()
  453. {leftarrow}
  454. {x}
  455. EndScript
  456.